﻿@model IList<ProductOverviewModel>
@if (Model.Any())
{
    <div id="block-recently-viewed-products" class="block block-recently-viewed-products">
        <h2 class="generalTitle">
            <span>@Loc["Products.RecentlyViewedProducts"]</span>
        </h2>
        <div class="col-12 px-0">
            <div class="form-row">
                @for (var i = 0; i < Model.Count; i++)
                {
                    var product = Model[i];
                    <div class="col-xl-3 col-lg-3 col-md-3 col-sm-4 col-6 mb-2 col-for-5-xl">
                        <div class="card">
                            <a class="text-center picture" href="@Url.RouteUrl("Product", new { product.SeName })">
                                <b-img-lazy class="img-fluid" alt="@product.DefaultPictureModel.AlternateText" src="@product.DefaultPictureModel.ImageUrl" title="@product.DefaultPictureModel.Title"></b-img-lazy>
                            </a>
                            <div class="card-body">
                                <h5 class="h6">
                                    <a href="@Url.RouteUrl("Product", new { product.SeName })">@product.Name</a>
                                </h5>
                            </div>
                        </div>
                    </div>
                }
            </div>
        </div>
    </div>
}